<?php
namespace app\index\controller;
use think\Controller;
use think\View;

class LittleSignature
{
    public function checkSignature()
    {
        $signature =  input('signature');
        $timestamp = input('timestamp');
        $nonce = input('nonce');
        $token = '619443525zgz';
        $tmpArr = array($token, $timestamp, $nonce);
        sort($tmpArr, SORT_STRING);
        $tmpStr = implode( $tmpArr );
        $tmpStr = sha1( $tmpStr );

        if( $tmpStr == $signature ){
            echo input('echostr') ;
            exit;
        }else{
            exit;
        }
    }
    public function test(){
        echo 'little_signature请求成功';
    }

}